import os
from file_reader import YmlReader


BASE_PATH = os.path.split(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))[0]
CONFIG_FILE = os.path.join(BASE_PATH, 'config', 'config.yml')
DATA_PATH = os.path.join(BASE_PATH, 'data')
REPORT_PATH = os.path.join(BASE_PATH, 'reports')
LOG_PATH = os.path.join(BASE_PATH, 'logs')
SRC_PATH = os.path.join(BASE_PATH, 'srcs')
CREATE_DATA_PATH = os.path.join(SRC_PATH, 'create_data')


class Config:
    def __init__(self, config=CONFIG_FILE):
        self.config = YmlReader(config).data

    def get(self, element, index=0):
        return self.config[index].get(element)


if __name__ == '__main__':
    # print(Config().config)
    print(BASE_PATH)
